package com.readygo.boot_test.service;

import com.readygo.boot_test.entity.Course;

import com.readygo.boot_test.repository.CourseRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CourseService {

    private CourseRepository courseRepository;

    @Autowired
    public CourseService(CourseRepository courseRepository) {
        this.courseRepository = courseRepository;
    }

    public Course saveOrUpdateCourse(Course course) {
        return courseRepository.save(course);
    }

}
